export const formTime = (dateObj, type = "-") => {
  let year = dateObj.getFullYear();
  let month = dateObj.getMonth() + 1;
  let date = dateObj.getDate();
  function form(num) {
    let str = String(num);
    return str.length >= 2 ? str : "0" + str;
  }

  return `${year}${type}${form(month)}${type}${form(date)}`;
};
